home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 21
/
Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso
/
Aminet
/
game
/
patch
/
pxhd.lha
/
ProjectX
/
src
/
lib
/
macros.i
< prev
next >
Wrap
Text File
|
1997-08-08
|
2KB
|
117 lines
include "/lib/utils_macros.i"
GO_SUPERVISOR:MACRO
move.l A6,-(sp)
move.l _SysBase,A6
JSRLIB SuperState
move.l D0,reloc_userstack
move.l (sp)+,A6
ENDM
GO_USER:MACRO
move.l reloc_userstack,D0
beq gsk$
move.l A6,-(sp)
move.l _SysBase,A6
JSRLIB UserState
move.l (sp)+,A6
gsk$
ENDM
SAVE_OSDATA:MACRO
move.l D0,-(sp)
move.l #\1,D0
JSRABS SaveOSData
move.l (sp)+,D0
ENDM
GETUSRADDR:MACRO
move.l _user_pbuffer(PC),D0
add.l #\1,D0
sub.l #_UserPatchRoutines,D0
ENDM
PATCHABSJMP:MACRO
movem.l D0/A1,-(sp)
lea \1,A1
move.w #$4EF9,(A1)+
move.l #\2,(A1)+
movem.l (sp)+,D0/A1
ENDM
PATCHABSJSR:MACRO
movem.l D0/A1,-(sp)
lea \1,A1
move.w #$4EB9,(A1)+
move.l #\2,(A1)+
movem.l (sp)+,D0/A1
ENDM
PATCHUSRJMP:MACRO
movem.l D0/A1,-(sp)
GETUSRADDR \2
lea \1,A1
move.w #$4EF9,(A1)+
move.l D0,(A1)+
movem.l (sp)+,D0/A1
ENDM
PATCHUSRJSR:MACRO
movem.l D0/A1,-(sp)
GETUSRADDR \2
lea \1,A1
move.w #$4EB9,(A1)+
move.l D0,(A1)+
movem.l (sp)+,D0/A1
ENDM
PATCHGENJMP:MACRO
movem.l D0/A1,-(sp)
GETGENADDR \2
lea \1,A1
move.w #$4EF9,(A1)+
move.l D0,(A1)+
movem.l (sp)+,D0/A1
ENDM
PATCHGENJSR:MACRO
movem.l D0/A1,-(sp)
GETGENADDR \2
lea \1,A1
move.w #$4EB9,(A1)+
move.l D0,(A1)+
movem.l (sp)+,D0/A1
ENDM
RELOCATE:MACRO
movem.l D0/A0/A1,-(sp)
GETUSRADDR \1
move.l D0,A0
move.l #\1,A1 ; to be sure to get absolute address.
move.l (A1),(A0) ; relocation in the usr patch routines zone.
movem.l (sp)+,D0/A0/A1
ENDM
HD_PARAMS:MACRO
XDEF _fname
_fname:
dc.b \1 ; used for diskfiles or files directory
XDEF _nname
_nname:
dc.b "0",0 ; user for diskfiles, zeroed by LoadFiles()
XDEF _conname
_conname:
dc.b \2,0
cnop 0,4
XDEF _filesize
_filesize:
dc.l \3
XDEF _nbdisks
_nbdisks:
dc.l \4
ENDM